protected virtual void CalculateButtonClicked (object sender, 
                                          System.EventArgs e)
{
  GLib.Idle.Add(OnIdleCalculatePi);
}

private bool OnIdleCalculatePi()
{
  GdkWindow.Cursor = new Gdk.Cursor(Gdk.CursorType.Watch);

  // lengthy computation			

  GdkWindow.Cursor = new Gdk.Cursor(Gdk.CursorType.LeftPtr);

  // Return false to ensure that this callback
  // is not automatically called again at the
  // next Idle moment.
  return false;
}
